package com.wu.constant;

public class RedisConstants {

    public static final long HOUR_1 = 3600;
    public static final long MINUTE_5 = 300;
    public static final long MINUTE_10 = 600;
    public static final long MINUTE_20 = 1200;
    public static final long MINUTE_30 = 1800;
    public static final long DAY_1 = 86400;

    //-------------------------------------------------------
    public static final String ES_TAGES = "search5:init:{es_tag_}";
    public static final String ES_HOT = "search5:init:{es_hot}";
    public static final String ES_TYPEKEY = "search5:init:{es_type_key_}";
    //-------------------------------------------------------

    public static final String MUSIC_NAME_SPACE = "es:mc5";
    public static final String MUSIC_NAME_SPACE_TOTAL = "es:mc5:tl";
    public static final String MUSIC_NAME_OUT_SPACE = "es:song:out";   // 外部合作歌曲搜索缓存key
    public static final String MUSIC_NAME_OUT_SPACE_TOTAL = "es:song:out:tl";   // 外部合作歌曲总数搜索缓存key
    public static final String MUSIC_NAME_SPACE_LYRIC = "es:mc5:lc";
    public static final String ACOTOR_NAME_SPACE = "es:at7";
    public static final String ALBUM_NAME_SPACE = "es:am7";
    public static final String ALBUM_NAME_SPACE_TOTAL = "es:am7:tl";
    public static final String PLAYLIST_NAME_SPACE = "es:pl8";
    public static final String PLAYLIST_NAME_SPACE_TOTAL = "es:pl8:tl";
    public static final String SUGGEST_NAME_SPACE = "es:sg5";
    public static final String DISLIKE_SUGGEST_NAME_SPACE = "es:dl";
    public static final String VIDEO_NAME_SPACE = "es:vo5";

    public static final String PODCAST_ALBUM_NAME_SPACE="es:ts5";

    public static final String PODCAST_ALBUM_NAME_SPACE_TOTAL="es:ts5:tl";

    public static final String CRBT_NAME_SPACE="es:cl5";

    public static final String CRBT_NAME_NAME_SPACE_TOTAL="es:cl5:tl";
    public static final String VIDEO_NAME_SPACE_TOTAL = "es:vo5:tl";
    public static final String SYNTHETICAL_SPACE = "es:sy16:";

    public static final String SEARCH_USER_LABEL = "es:label:{%s}";

    public static final String SEARCH_ONLINE_LYRIC = "es:lyric:{%s}";

    public static final String SEARCH_CUSTOM_DICTIONARY = "es:{ct}:dic";
    public static final String LAST_CUSTOM_DICTIONARY = "last:cust:dic";

    /**
     * 热门实体库最后更新时间
     */
    public static final String LAST_POP_WORD = "last:pop:word";
    public static final String LAST_CUSTOM_KEYWORD = "last:cust:keyword";

    // 电台缓存数据
    public static final String RECO_RADIO_MUSIC_STR = "rc:rd:ms:{%s}";
    // 电台缓存数据  根据lastSongId 拆分
    public static final String RECO_RADIO_MUSIC_MAP = "rc:rd:mm:{%s}";
    // 用户 电台数据lastSongId
    public static final String RECO_RADIO_USER_LAST = "rc:rd:ms:ul:%s:{%s}";


    public static final String RECO_VIDEO = "reco:video:{%s}:%s:%s:%s";


    public static final String ES_TAGS_RELATION = "es:{tag}:relation";


    public static final String HOT_TOP_SONG_PUSH_NUM = "hot:pu:num";

    /****
     * 偏好设置 标签对应歌曲缓存key
     */
    public static final String PREFERENCE_SONG_REGION_CHANNEL_TAG = "reco:preference:tag_song:%s:%s:{%s}";

    /****
     * 偏好 region channel 歌手下的song
     */
    public static final String PREFERENCE_SONG_REGION_CHANNEL_ACTOR = "reco:preference:actor_song:%s:%s:{%s}";

    //歌曲热度同步开关
    public static final String DMS_GRADE_SONG_CIRCUIT_CHANGER = "dms:grade_song:circuit_changer";

    //视频热度同步开关
    public static final String DMS_GRADE_VIDEO_CIRCUIT_CHANGER = "dms:grade_video:circuit_changer";
    
    //歌手热度同步开关
    public static final String DMS_GRADE_ACTOR_CIRCUIT_CHANGER = "dms:grade_actor:circuit_changer";

    //彩铃热度同步开关
    public static final String DMS_GRADE_CBR_CIRCUIT_CHANGER = "dms:grade_cbr:circuit_changer";
    
    //听书热度同步开关
    public static final String DMS_GRADE_LISTENBOOK_CIRCUIT_CHANGER = "dms:grade_listenbook:circuit_changer";
    
    //搜索推荐服务内部 redis 消息渠道 redis_message_channel(rmc) reco-data -> reco-provider
    public static final String RS_SERVICE_WITHIN_RMC = "RS_SERVICE_WITHIN_RMC";

    //推荐服务到data服务的redis消息
    public static final String RS_RECO_TO_DATA_RMC = "RS_RECO_TO_DATA_RMC";

    public final static String INVALID_KEY = "reco:{song}:invalid";
    public final static String VALID_KEY = "reco:{song}:valid";

    public final static String AB_BLOOM_KEY = "reco:ab:%s:%s";
    
    // 拼接ab分组groupId 后续更新进组人数
    public final static String AB_GROUP_NUM_KEY = "reco:ab:group:num:{%s}";


    /**
     * aviator全量规则id
     */
    public final static String RULE_FULL_INFO = "reco:aviator:allRules:%s:%s";

    /**
     * 暗词干预信息
     */
    public final static String CrypticWordsInterveneInfo = "reco:crypticWord:intervene:%s:%s";

    /**
     * search:sort:channel:region 综搜tab顺序干预
     */
    public final static String SEARCH_SORT_INTERVENE = "search:sort:%s:%s";

    /**
     * 综搜查无推荐缓存 %s  keyword md5
     */
    public final static String SEARCH_RECO_KEY = "search:sort:{%s}";


    /**
     * reco:daily:intervene:channel:region  每日推荐人工干预
     * position_resId
     */
    public final static String DAILY_SONG_INTERVENE = "reco:daily:intervene:%s:%s";

    public final static String ALIAS_CONFIG_KEY = "reco:alias:config2";

    // 主题缓存
    public final static String THEME_SONG_KEY = "reco:theme:{%s}"; // 拼接songId
    public final static String THEME_BASE_KEY = "reco:{theme}:base";

    //secretManage 密码轮换
    public static final String SECRET_MANAGER_TOPIC = "SECRET_MANAGER_TOPIC";

}
